# with open('code.png','wb') as fp:
#     fp.read()


import io
#文件流 也是分字符流和字节流
str_io=io.StringIO()
str_io.write("123")
print(str_io.getvalue())

by_io=io.BytesIO()
by_io.write(b"123123")
print(by_io.getvalue())

